package model

import (
	"gorm.io/gorm"
	"time"
)

type Subscribe struct {
	gorm.Model
	UserId    int        `gorm:"column:user_id;type:int;not null"`
	Title     string     `gorm:"column:title;index:idx_title;type:varchar(225);not null"`
	Describe  string     `gorm:"column:describe;type:varchar(225);not null"`
	StartDate *time.Time `gorm:"column:start_date;type:datetime;not null"`
	EndDate   *time.Time `gorm:"column:end_date;type:datetime;not null"`
	Reward    int        `gorm:"column:reward;type:int;not null"`
	Address   string     `gorm:"column:address;type:varchar(225);not null"`
	Phone     string     `gorm:"column:phone;type:varchar(11);not null"`
	Onwer     User       `gorm:"ForeignKey:UserId"`
}
